using System.Collections;
using System.Collections.Generic;
using UnityEngine;

// 标记类可以序列化
[System.Serializable]
public class GameData
{
    // 货币数量
    public int currency;

    // 技能树
    public SerializableDictionary<string, bool> skillTree;

    // 序列化字典，用于存储物品的ID和数量
    public SerializableDictionary<string, int> inventory;

    // 列表，用于存储装备物品的ID
    public List<string> equipmentId;

    // 检查点字典
    public SerializableDictionary<string, bool> checkpoints;
    // 最近的检查点
    public string closestCheckpointId;


    public int lostCurrencyAmount;//死亡时重新游戏保存灵魂位置和金币数
    public float lostCurrencyX;
    public float lostCurrencyY;

    public SerializableDictionary<string, float> volumeSettings;//音量


    public GameData()
    {
        this.lostCurrencyAmount = 0;
        this.lostCurrencyX = 0;
        this.lostCurrencyY = 0;

        // 初始化货币数量为0
        this.currency = 0;
        // 初始化技能数
        skillTree = new SerializableDictionary<string, bool>();
        // 初始化物品字典
        inventory = new SerializableDictionary<string, int>();
        // 初始化检查点字典
        checkpoints = new SerializableDictionary<string, bool>();
        // 初始化装备ID列表
        equipmentId = new List<string>();
        // 初始化最近的检查点
        closestCheckpointId = string.Empty;
        // 初始化音量设置
        volumeSettings = new SerializableDictionary<string, float>();

    }
}